<HTML><HEAD><TITLE>integer_list_to_dom(+List, -Dom)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(fd)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>integer_list_to_dom(+List, -Dom)</H1>
Convert a sorted list of integers and integer intervals into a domain Dom.


<DL>
<DT><EM>+List</EM></DT>
<DD>A list of integers and integer interval.
</DD>
<DT><EM>-Dom</EM></DT>
<DD>Variable.
</DD>
</DL>
<H2>Description</H2>
   Convert a sorted list of integers and integer intervals into a domain
   Dom.  List must be sorted and integers must not overlap with intervals.
   Note that using sort/2 on a list of integers and intervals does not
   produce correct results because intervals are considered compound terms
   and thus sorted after all integers.  This predicate converts a list of
   successive integers into an interval and/or merges it with adjacent
   intervals.  Typically, it will be used to convert a sorted list of
   integers into a list of intervals and an appropriate domain.  If the
   list is already known to contain the right intervals, it is quicker to
   use sorted_list_to_dom/2.

<P>

<H3>Fail Conditions</H3>
   None.


<H3>Resatisfiable</H3>
   No.
<H3>Exceptions</H3>
<DL>
<DT><EM>(4) instantiation fault </EM>
<DD>List is not ground.
<DT><EM>(5) type error </EM>
<DD>List contains an element which is neither integer nor an    integer interval.
<DT><EM>(6) out of range </EM>
<DD>The size of the resulting domain is too large.
<DT><EM>(6) out of range </EM>
<DD>The list is not sorted properly.
</DL>
<H2>See Also</H2>
<A HREF="../../lib/fd/sorted_list_to_dom-2.html">sorted_list_to_dom / 2</A>, <A HREF="../../lib/fd/dvar_domain-2.html">dvar_domain / 2</A>
</BODY></HTML>
